package com.shuangyuan.demo03;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.File;
import java.io.IOException;
import java.net.URL;

public class Test01 {
    public static void main(String[] args) throws Exception {
        Student s=new Student();
        Teacher t=new Teacher();


        ClassLoader classLoader = Test01.class.getClassLoader();
        URL resource = classLoader.getResource("beans.xml");
        String path = resource.getPath();
        File f=new File(path);
        Document parse = Jsoup.parse(f, "UTF-8");
        Elements bean = parse.getElementsByTag("bean");
        for (Element element : bean) {
            System.out.println(element);
        }
    }
}
